package com.test.springboot3.springboot3testdemo1.controller;

import com.test.springboot3.springboot3testdemo1.health.IndexObservation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2024/8/7-下午4:28
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@RequiredArgsConstructor
@Slf4j
@Controller
public class LoginController {
  private final IndexObservation indexObservation;

  @GetMapping("/")
  @ResponseBody
  public String index() {
    log.info("this is index page");
    indexObservation.observe();
    return "index";
  }
}
